<!DOCTYPE html>
<html lang="zh-CN">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1, user-scalable=no">
    <meta http-equiv="X-UA-Compatible" content="ie=edge,chrome=1">
    <meta name="author" content="赵鹤阳">
    <title>订单</title>
    <style>
        ul {
            margin: 0;
            padding: 0;
            list-style: none;
        }

        .box {
            position: relative;
            width: 600px;
            height: 500px;
            border: 1px solid #bbb;
            margin: 100px auto;
            text-align: center;
        }

        .order {
            margin-left: 200px;
        }

        .order>li {
            width: 100px;
            height: 30px;
            float: left;
            border: 1px solid #bbb;
            position: relative;
        }

        .active {
            width: 100px;
            height: 120px;
            top: 30px;
            position: absolute;
            border: 1px solid #bbb;
            display: none;
        }

        .active li {
            width: 100%;
            border-bottom: 1px solid #bbb;
            line-height: 40px;
        }

        .box>span {
            position: absolute;
            bottom: 250px;
            right: 290px;
        }
        .add{
            background-color: #ddd;
        }
    </style>
</head>

<body>
    <div class="box">
        <ul class="order">
            <li>
                <span>销售订单</span>
                <ul class="active">
                    <li>订单1</li>
                    <li>订单2</li>
                    <li>订单3</li>
                </ul>
            </li>
            <li>
                <span>消费订单</span>
                <ul class="active">
                    <li>消费1</li>
                    <li>消费2</li>
                    <li>消费3</li>
                </ul>
            </li>
        </ul>
        <span>00</span>
    </div>
</body>
<script src="jquery.js"></script>

</html>
<script>
    $('.order>li').hover(function () {
        $(this).find('.active').show();
    }, function () {
        $(this).find('.active').hide();
    });
    $('.active>li').click(function () {
        $('.box>span').html($(this).html());
        $('.active').hide();
    })
    $('.active>li').hover(function () {
        $(this).addClass('add');
    }, function () {
        $(this).removeClass('add')
    })

</script>